﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tournament;
using NUnit.Framework;
using System.IO;
using System.Globalization;

namespace TournamentTest
{
    [TestFixture]
    public class TournamentTest
    {
        [Test]
        public void JumpHeightTest()
        {
            Tourney t = new Tourney();
            Assert.AreEqual(t.SelectJumpingHeight(10), 10);
        }

        [Test]
        public void GenderTest()
        {
            Tourney t = new Tourney();
            StringAssert.AreEqualIgnoringCase("male", t.SelectGender("Male"));
        }

        [Test]
        public void CalcPtsTest()
        {
            Tourney t = new Tourney();
            Assert.AreEqual(45, t.CalcPts(5, 5, 5, 5, 5));
        }

        [Test]
        public void SearchTest()
        {
            Tourney t = new Tourney();
            t.Readfromfile();
            StringAssert.AreEqualIgnoringCase("101A", (t.Search("1M")));
        }

        [Test]
        public void ReadFromFileTest()
        {
            Tourney t = new Tourney();
            t.Readfromfile();
        }

        [Test]
        public void CalcPtsnDDTest()
        {
            Tourney t = new Tourney();
            t.Readfromfile();
            Assert.AreEqual(54, t.CalcPtsnDD("101A", "10M", 10, 9, 8, 6, 7));
        }
    }
}
